<template>
  <div>
      <el-table
    :data="message"
    border
    style="width: 100%">
    <el-table-column
      fixed
      type="index"
      label="序号"
      align="center"
      width="50">
    </el-table-column>
    <el-table-column
      prop="name"
      align="center"
      label="品牌名称"
      width="200">
    </el-table-column>
    <el-table-column
      prop="showStatus"
      align="center"
      label="展示状态"
      width="200">
      <template slot-scope="scope">
            <el-switch
    v-model="scope.row.showStatus"
    active-color="#13ce66"
    inactive-color="#ff4949"
    :active-value="1"
    :inactive-value="0">
  </el-switch>
          </template>
    </el-table-column>
    <el-table-column
      prop="city"
      label="logo"
      width="200">
<template slot-scope="scope">
    <img :src="scope.row.logo" alt="" style="width:100px;height:100px;">
        </template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="专区大图"
      align="center"
      width="200">
      <template slot-scope="scope">
    <img :src="scope.row.bigPic" alt="" style="width:100px;height:100px; text-align:center;">
        </template>
    </el-table-column>
    <el-table-column
      prop="brandStory"
      label="品牌故事"
      align="center"
      width="200">
    </el-table-column>
     <el-table-column
      prop="createTime "
      label="创建时间"
      align="center"
      width="300">
    </el-table-column>
     <el-table-column
      prop="sort"
      label="序列"
      align="center"
      width="200">
    </el-table-column>
     <el-table-column
      prop="productCommentCount"
      label="产品评论数量"
      align="center"
      width="200">
    </el-table-column>
    <el-table-column
      prop="productCount"
      label="产品数量"
      align="center"
      width="200">
    </el-table-column>
    <el-table-column
      prop="factoryStatus "
      label="是否品牌制造商"
      align="center"
      width="200">
       <template slot-scope="scope">
           <p v-if="scope.row.factoryStatus==0">不是</p>
           <p v-else>是</p>
        </template>
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      align="center"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
        <el-button type="text" size="small" style="color:red;"  @click="delhandleClick(scope.row)">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script >
export default {
    props:['message'],
  data () {
    return {
    };
  },

  components: {},

  computed: {},

  mounted() {},

  methods: {
      delhandleClick(row){
        //   console.log(row)
     
          this.$emit('tplet',row);
      },
      handleClick(row){
          console.log(row)
     
          this.$emit('titleChanged',row);
      }
  }
}

</script>
<style lang="scss" scoped>
</style>